<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Login</title>
</head>
<body>
<h1>LOGIN</h1>

<button id="loginBtn">测试登录</button>
<textarea id="loginResult" readonly></textarea>

<script src="../js/axios.js"></script>
<script>
    let baseURL = 'http://localhost:8080/sb';
    document.getElementById('loginBtn').addEventListener('click', () => {
        axios.post(baseURL + '/emp/login', {
            username: 'admin',
            password: 'e10adc3949ba59abbe56e057f20f883e'
        }).then(function (res) {
            console.log(res.data);
        }).catch(function (error) {
            console.log(error)
        })
    })
</script>
</body>
</html>